package com.study.forumsystemproject.dao;

import com.study.forumsystemproject.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    int insert(User row);

    int insertSelective(User row);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User row);

    int updateByPrimaryKey(User row);
    @Select("select id,username,password,nickname,phoneNum,email,gender,salt,avatarUrl" +
            ",articleCount,isAdmin,state from t_user where username = #{username} and state = 0")
    User selectByUsername(String username);
}